/*
 * GeoReactor.h
 *
 *  Created on: 18 Oct 2011
 *      Author: allan
 */

#ifndef GEOREACTOR_H_
#define GEOREACTOR_H_

// GeoReact includes
#include "Core/KineticSolver.h"
#include "Core/Experimental/KineticSolverEuler.h"

// GeoReact forward declarations
class GeoState;
class GeoSystem;

class GeoReactor
{
public:
	GeoReactor(const GeoSystem& system);
	
	void SetMinimumTimeStep(double dtMin);
	
	void SetMaximumTimeStep(double dtMax);
	
	void SetAlgorithm(OdeAlgorithm algorithm);
	
	void SetAdaptiveTimeStepControl(double epsAbs, double epsRel);
	
	const double GetTimeStep() const;
	
	void React(double& t, double tEnd, GeoState& state);
	
	void ReactEuler(double& t, double tEnd, GeoState& state);
	
private:
	const GeoSystem& system;
	
	KineticSolver kSolver;
	
	KineticSolverEuler kSolverEuler;
	
	double dtMin, dtMax;
	
	double dt;
};

#endif /* GEOREACTOR_H_ */
